import fetch from '@/utils/fetch'

//获取自助缴费信息列表
export function getPayList(params) {
	return fetch({
	    url: `/pay/v1/mgt/fee`,
	    method: 'get',
	    params
  	})
}

//同步缴费记录
export function syncData(order_id) {
	return fetch({
		url:`/pay/v1/mgt/fee/${order_id}/sync`,
		method:'patch'
	})
}

//拉取自助缴费推送数据
export function getPayPush(params){
	return fetch({
		url:`/pay/v1/mgt/fee/push/rule`,
		method:'get',
		params
	})
}

//设置自助缴费推送数据
export function setPayPush(data){
	return fetch({
		url:`/pay/v1/mgt/fee/push/rule`,
		method:'post',
		data
	})
}

//自助缴费列表字段映射
export const keyMapping={
	area_name:"所属小区",
	order_id:"订单号",
	fee:"支付金额(分)",
	create_time:"缴费时间",
	room_name:"缴费房产",
	user_name:"缴费用户",
	phone:"联系电话",
	desc:"描述",
	sync:"是否同步",
	state:"状态",
	transaction_id:"交易id",
	channel:"通道"
}